package com.sali.rbac.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sali.rbac.convert.SysUserConvertDO2Model;
import com.sali.rbac.mapper.SysUserMapper;
import com.sali.rbac.model.SysUserModel;
import com.sali.rbac.orm.SysUserDO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @description:
 * @author: sali
 * @date: 2024/7/20 12:01.
 * @version: 1.0
 */
@Service
public class SysUserRepository extends ServiceImpl<SysUserMapper, SysUserDO> {

    @Resource
    private SysUserMapper sysUserMapper;

    @Resource
    private SysUserConvertDO2Model sysUserConvertDO2Model;

    public SysUserModel selectBySysUserByAccount(String account){
        SysUserDO sysUserDO = sysUserMapper.selectSysUserDOByAccount(account);
        return sysUserConvertDO2Model.convert(sysUserDO);
    }

}
